package com.hzncc.flowable_diboot.project_contracts.vo;

import com.diboot.core.binding.annotation.BindDict;
import com.diboot.core.binding.annotation.BindEntityList;
import com.diboot.core.binding.annotation.BindField;
import com.diboot.core.vo.FileVO;
import com.diboot.core.vo.LabelValue;
import com.diboot.file.entity.FileRecord;
import com.diboot.iam.entity.IamUser;
import com.hzncc.flowable_diboot.project_contracts.entity.ProjectSamContract;
import lombok.Getter;
import lombok.Setter;
import lombok.experimental.Accessors;

import java.util.List;
/**
* 项目类产品供销合同 VO定义
* @author MyName
* @version 1.0
* @date 2024-09-26
* Copyright © MyCorp
*/
@Getter @Setter @Accessors(chain = true)
public class ProjectSamContractListVO extends ProjectSamContract  {
private static final long serialVersionUID = 1218373924097700688L;
    /**
    * 合同补充附件 关联文件信息
    */
    @BindEntityList(entity = FileRecord.class, condition = "this.contract_supplement = id", splitBy = ",")
    private List<FileVO> contractSupplementFiles;

    /**
    * 交货时间 关联字典选项
    */
    @BindDict(
    type = "deliveryTime",
    field = "deliveryTime"
    )
    private LabelValue deliveryTimeLabel;

    /**
    * 付款方式 关联字典选项
    */
    @BindDict(
    type = "projectContractPayMethod",
    field = "paymentMethod"
    )
    private LabelValue paymentMethodLabel;

    /**
    * 乙方委托代理人 关联信息
    */

    @BindField(
        entity = IamUser.class,
        field = "realname",
        condition = "this.party_b_authorized_representative = id"
     )
    private String partyBAuthorizedRepresentativeLabel;

    /**
    * 合同附件 关联文件信息
    */
    @BindEntityList(entity = FileRecord.class, condition = "this.appendix = id", splitBy = ",")
    private List<FileVO> appendixFiles;

    /**
    * 创建人 关联信息
    */

    @BindField(
        entity = IamUser.class,
        field = "realname",
        condition = "this.create_by = id"
     )
    private String createByLabel;

    /**
    * 更新人 关联信息
    */

    @BindField(
        entity = IamUser.class,
        field = "realname",
        condition = "this.update_by = id"
     )
    private String updateByLabel;

}